#pragma once

#include <QtGui/QFrame>
#include <QtGui/QPushButton>
#include <QtGui/QComboBox>
#include <QtGui/QLabel>

#include "MefoolQImageWidget.h"
#include "MefoolDevice.h"

namespace Mefool
{

class QDeviceWidget :	public QFrame,
						public Mefool::Device::Listener
{ 
	Q_OBJECT

public:
	QDeviceWidget( QWidget* parent, Mefool::Device* device );
	virtual ~QDeviceWidget();

	Mefool::Device*			getDevice() const { return mDevice; }

protected:
	//virtual void			onDeviceStarted( Device* /*device*/ ) {}
	virtual void			onDeviceCapturedImage( Device* /*device*/ );
	//virtual void			onDeviceStopping( Device* /*device*/ ) {}

private slots:
	void					startStopButtonPressed();

private:
	Mefool::Device*			mDevice;
	Mefool::QImageWidget*	mImageWidget;
	QComboBox*				mCaptureSettingsCombo;
	QPushButton*			mStartStopButton;
	QLabel*					mImageNumberLabel;
	
};

}